//
//  LeveyPopListViewCell.m
//  LeveyPopListViewDemo
//
//  Created by Levey on 2/21/12.
//  Copyright (c) 2012 Levey. All rights reserved.
//

#import "PushMenuViewCell.h"
#import "Config.h"
#import "Utility.h"
@implementation PushMenuViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        CGRect rect=self.frame;
        rect.size.width=225.0;
        self.frame=rect;
        self.selectionStyle=UITableViewCellSelectionStyleNone;
        self.backgroundColor = [UIColor clearColor];
       UIImageView *background=[[UIImageView alloc]initWithImage:[Utility imageNamed:@"pushcell_normal.png"]];
        background.frame=rect;
        self.backgroundView=background;
        UIImageView *dot=[[UIImageView alloc] initWithFrame:CGRectMake(18, 19, 4, 4)];
        dot.image=[Utility imageNamed:@"pushmenu_dot.png"];
        [self addSubview:dot];
        self.menuSubject=[self detailTextLabel:CGRectMake(33, 12, 200, 20) andFontSize:15.0];
         self.menuSubject.textColor=UIColorFromRGB(0xffffff);
        [self addSubview:self.menuSubject];
    }
    return self;
}

-(UILabel *) detailTextLabel:(CGRect) rect  andFontSize:(float) fontsize{
    UIFont *font=[UIFont fontWithName:FONT_FAMILY size:fontsize];
    UILabel *labeltemp=[[UILabel alloc] initWithFrame:rect];
    labeltemp.font=font;
    labeltemp.backgroundColor=[UIColor clearColor];
    return labeltemp;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated{
    [super setSelected:selected animated:animated];
    /*if (self.selected) {
        UIImageView *backView=[[UIImageView alloc] initWithImage:[Utility imageNamed:@"memuCell_bg_pressed.png"]];
        backView.frame=self.frame;
        self.backgroundView=backView;
    }*/
    
}
-(void) setBackgroundImage:(NSString*)imageName{
    UIImageView *backView=[[UIImageView alloc] initWithImage:[Utility imageNamed:imageName]];
    backView.frame=self.frame;
    self.backgroundView=backView;
}
-(void) dealloc{

}

@end
